package wedaex;

import java.io.File;
import java.io.IOException;

import org.apache.commons.io.FileUtils;
import org.htmlparser.Parser;
import org.htmlparser.filters.TagNameFilter;
import org.htmlparser.nodes.TagNode;
import org.htmlparser.util.NodeList;
import org.htmlparser.util.ParserException;

public class TestHtmlParser {
	public static void main(String[] args) throws IOException, ParserException {
		String content = FileUtils.readFileToString(new File("fixtures/html/simple.html"));
		Parser parser = new Parser(content);
		NodeList nodeList = parser.parse(null);
		nodeList = nodeList.extractAllNodesThatMatch(new TagNameFilter("body"), true);
		TagNode bodyTag = (TagNode) nodeList.elementAt(0);
	}
}
